Skip to main content

Coupons Report

Overview

This document provides information about Coupons Report.

Related: https://gitlab.com/publicala/general/-/issues/512

SELECT COUNT(*) FROM coupons WHERE tenant_id = 2513;

-- This is the query to create the view
-- It's prefixed with `delete` so that we know it can be deleted
CREATE VIEW delete_santillana_guatemala_coupons_export AS
SELECT
code AS 'Code',
CONCAT(
'-', amount, '%') AS 'Amount',
uses AS 'Uses',
use_limit AS 'Use limit',
valid_to AS 'Valid to',
deleted_at AS 'Disabled at'
FROM
coupons
WHERE
tenant_id = 2513;

-- This is the query to delete the view
DROP VIEW delete_santillana_guatemala_coupons_export;

X

Graph View